package com.frameworks.core.web.result;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

/**
 * @FileName : RetDataMsg.java
 * @Description :
 * @Copyright : Copyright (c) 2015
 * @author caoyong
 * @date Jul 29, 2015 3:12:49 PM
 */
public class DataResult extends MsgResult {

	private static final long serialVersionUID = 1L;
	
	private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
	
	private long total = 0;
	private Object rows;
	

	public long getTotal() {
		return total;
	}
	
	public void setTotal(long total) {
		this.total = total;
	}

	public Object getRows() {
		return rows;
	}
	
	public void setRows(Object data) {
		this.rows = JSON.parse(JSON.toJSONStringWithDateFormat(data, DEFAULT_DATE_FORMAT, SerializerFeature.WriteDateUseDateFormat));
	}
	
}
